home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindspring.com!usenet
- From: rudd@mindspring.com (Justin Rudd)
- Newsgroups: comp.lang.c++
- Subject: Re: TYPEDEF help needed
- Date: Fri, 15 Mar 1996 03:22:16 GMT
- Organization: MindSpring Enterprises
- Message-ID: <4ianrs$m0f@B1FF.mindspring.com>
- References: <Do9J5n.KE7.0.-s@cs.vu.nl>
- Reply-To: rudd@mindspring.com
- NNTP-Posting-Host: rudd.mindspring.com
- X-Newsreader: Forte Free Agent v0.55
-
- >typedef struct Coordinates
- >{
- > int x,y;
-
- >} Coordinates;
-
- Try this....
-
- typedef struct _Coordinates
- {
- int x,y;
- } Coordinates;
-
- The reason it probably wasn't working is because the name of the
- struct and the variable were the same...it is on the same concept of
- this: int int. You can't declare an int with the name int.
-
- As for the list try this....
-
- typedef Coordinates CoordList[100];
-
- Hope this helps....
-
- Justin Rudd
- rudd@mindspring.com
-
-